﻿def dictA(dictB):
    dict_present={}
    for key,value in dictB.items():
        if len(value)>2:
            dict_present[key]=value[:2]
            pass
        else:
            dict_present[key]=value


    return dict_present
dict_1={'名字':'纳兰嫣然','爱好':'打篮球'}
print(type(dictA(dict_1)))


    